require('../css/commonCss/normalize.css')
require('../css/commonCss/reset.css')
require('../css/commonCss/property.css')
require('../css/commonCss/basic.less')

require('animate.css')
require('../css/advert.less')


// 文档加载事件
document.addEventListener('DOMContentLoaded', function () {

    // 需求1：点击按钮跳转页面
    // 获取元素
    const contButton = document.querySelector('.cont-button')
    contButton.addEventListener('click', function () {
        location.href = `./register.html`
    })
    function docutdownTime() {
        // 获取元素
        const cutdownTime = document.querySelector('#cutdownTime')
        // 倒计时5s之后跳转页面
        let time = 5;
        setInterval(function () {
            // 时间自减
            --time;
            if (time <= 0) {
                location.href = `./register.html`
            } else {
                cutdownTime.textContent = time + 's'   //渲染到页面中
            }
        }, 1000)
    }
    docutdownTime()
})